<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:p="http://primefaces.prime.com.tr/ui"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">
    <h:head>
        <title>Facelet Title</title>
        <link href="./resources/primefaces-sunny/theme.css" rel="stylesheet" type="text/css" />
    </h:head>
    <h:body>
        <h:form>
            <p:growl id="growl" showDetail="true"/>
            <p:dataTable var="payment" value="#{admin.showInfor}" paginator="true" rows="10"  
                         selection="#{admin.pd}" selectionMode="single"  
                         rowSelectListener="#{admin.onRowSelect}"  
                         onRowSelectUpdate="display growl"  
                         onRowSelectComplete="carDialog.show()"  
                         onRowUnselectUpdate="growl">  

                <f:facet name="header">  
                    Select a row to display a message  
                </f:facet>  

                <p:column>  
                    <f:facet name="header">  
                        <h:outputText value="Model" />  
                    </f:facet>  
                    <h:outputText value="#{car.model}" />  
                </p:column>  

                <p:column>  
                    <f:facet name="header">  
                        <h:outputText value="Year" />  
                    </f:facet>  
                    <h:outputText value="#{car.year}" />  
                </p:column>  

                <p:column>  
                    <f:facet name="header">  
                        <h:outputText value="Manufacturer" />  
                    </f:facet>  
                    <h:outputText value="#{car.manufacturer}" />  
                </p:column>  

                <p:column>  
                    <f:facet name="header">  
                        <h:outputText value="Color" />  
                    </f:facet>  
                    <h:outputText value="#{car.color}" />  
                </p:column>  
            </p:dataTable>
            <p:dialog header="Account Details" widgetVar="accountDetailsDialog" resizable="false"  
                      width="400" showEffect="explode" hideEffect="explode">  

                <h:panelGrid id="result" columns="2" cellpadding="4">  

                    <h:outputText value="UserName" />  
                    <h:outputText value="" />  

                    <h:outputText value="Year:" />  
                    <h:outputText value="#{tableBean.selectedCar.year}" />  

                    <h:outputText value="Manufacturer:" />  
                    <h:outputText value="#{tableBean.selectedCar.manufacturer}" />  

                    <h:outputText value="Color:" />  
                    <h:outputText value="#{tableBean.selectedCar.color}" />  
                </h:panelGrid>  
            </p:dialog>
        </h:form>
    </h:body>
</html>

